import axios from "../../utils/axios";

// 空间管理
// 添加空间
export function addSpace(query) {
    return axios({
        url: "/admin/space/add",
        method: "post",
        data: query
    });
}
// 空间列表
export function getSpaceList(query){
    return axios({
        url: "/admin/space/index",
        method: "get",
        params: query
    })
}
// 删除空间
export function delSpaceList(query){
    return axios({
        url: "/admin/space/delspace",
        method: "get",
        params: query
    })
}

// 获取空间下的工位/房间/会议室列表
export function getSpaceRoom(query){
    return axios({
        url: "/admin/space/getSpaceRoom",
        method: "get",
        params: query
    })
}
// 修改
export function editSpaceRoom(query) {
    return axios({
        url: "/admin/space/editSpaceRoom",
        method: "post",
        data: query
    });
}
// 删除
export function delSpaceRoom(query){
    return axios({
        url: "/admin/space/delSpaceRoom",
        method: "get",
        params: query
    })
}

// 入驻企业管理
// 添加
export function addCompany(query){
    return axios({
        url: "/admin/company/addInfo",
        method: "post",
        data: query
    })
}
// 获取
export function getCompany(query){
    return axios({
        url: "/admin/company/index",
        method: "get",
        params: query
    })
}
// 修改
export function modifyInfo(query){
    return axios({
        url: "/admin/company/modifyInfo",
        method: "post",
        data: query
    })
}
// 删除
export function delCompany(query){
    return axios({
        url: "/admin/company/delinfo",
        method: "get",
        params: query
    })
}
// 获取企业中员工信息
export function getWorkers(query){
    return axios({
        url: "/admin/company/getworkers",
        method: "get",
        params: query
    })
}

// 其他信息管理（证书管理）
// 添加证书
export function addZhengshu(query){
    return axios({
        url: "/admin/company/addotherinfo",
        method: "post",
        data: query
    })
}
// 获取证书信息列表
export function getZhengshuList(query){
    return axios({
        url: "/admin/company/getotherinfo",
        method: "get",
        params: query
    })
}

// 获取日志
export function getLog(query){
    return axios({
        url: "/admin/space/getlog",
        method: "get",
        params: query
    })
}

// 获取申请工位信息
export function getApplyInfo(query){
    return axios({
        url: "/admin/space/getApplyInfo",
        method: "post",
        data: query
    })
}
// 编辑审核结果
export function editApplyInfo(query){
    return axios({
        url: "/admin/space/editApplyInfo",
        method: "post",
        data: query
    })
}

// 支付记录
// 获取
export function getPayLog(query){
    return axios({
        url: "/admin/company/getPayLog",
        method: "get",
        params: query
    })
}

// 添加
export function setPayLog(query){
    return axios({
        url: "/admin/company/setPayLog",
        method: "post",
        data: query
    })
}

// 删除
export function delPayLog(query){
    return axios({
        url: "/admin/company/delPayLog",
        method: "get",
        params: query
    })
}

// 空间资料
// 获取
export function getSpaceFile(query){
    return axios({
        url: "/admin/space/getSpaceFile",
        method: "get",
        params: query
    })
}
// 添加
export function addSpaceFile(query){
    return axios({
        url: "/admin/space/addSpaceFile",
        method: "post",
        data: query
    })
}
// 删除
export function delSpaceFile(query){
    return axios({
        url: "/admin/space/delSpaceFile",
        method: "get",
        params: query
    })
}

// 获取会议会议室预订详情
export function getapplydetail(query){
    return axios({
        url: "/admin/space/getapplydetail",
        method: "get",
        params: query
    })
}
